﻿using UnityEngine;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Blo
{
    public class DictCopyTaskBlo
    {
        static public Dict.DataModel.TableCopyTask GetTaskById(string taskId)
        {
            return Dict.DictDataManager.Instance.tableCopyTaskDao.GetById(taskId);
        }

        static public System.Collections.Generic.List<Dict.DataModel.TableCopyTask> GetTasksByLevelId(string levelId)
        {
            return Dict.DictDataManager.Instance.tableCopyTaskDao.GetByOneIndex(levelId);
        }

        public static TableCopyTask GetFirstTaskOfMission(string missionId)
        {
            var list = Dict.DictDataManager.Instance.tableCopyTaskDao.GetByOneIndex(missionId);
            if(list.Count > 0)
            {
                return list[0];
            }
            return null;
        }
    }
}